package com.good.serviceImp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.good.dao.RoleDao;
import com.good.entity.Abs;
import com.good.entity.Role;
import com.good.service.RoleService;
@Service("roleServiceImpl")
@Transactional
public class RoleServiceImpl extends BaseServiceImpl<Role,Long> implements RoleService {
	@Resource(name="roleDaoImpl")
	private RoleDao roleDao;

	@Resource(name="roleDaoImpl")
	public void setBaseDao(RoleDao roleDao) {
		super.setBaseDao(roleDao);
	}

	@Transactional(readOnly=true)
	@Override
	public Role findByName(String name) {
		return roleDao.findByName(name);
	}
	
	@Transactional(readOnly=true)
	@Override
	public List<Role> findByLikeName(String name) {
		return roleDao.findByLikeName(name);
	}
	@Transactional(readOnly=true)
	@Override
	public String findByRoleId(Long id) {
		// TODO Auto-generated method stub
		return roleDao.findByRoleId(id);
	}
	@Transactional(readOnly=true)
	@Override
	public Abs findById(Long id) {
		return roleDao.findById(id);
	}
}
